from django.db.models import CharField,BooleanField,TextField,DateTimeField
from apps.vadmin.op_drf.models import CoreModel


# 状态描述表
class StatusLabels(CoreModel):
    # TAG_CHOICES = (
    #     (0, "不可部署"),
    #     (1, "可部署"),
    #     (2, "待处理"),
    #     (3, "已存档"),
    # )
    name = CharField(max_length=256,null=False,verbose_name="分类名称")
    deleted_datetime = DateTimeField(null=True,verbose_name="删除时间")
    tag = BooleanField(max_length=4,default=0,null=True,verbose_name="状态类型") # 0:不可部署 1：可部署 2：待处理 3：已存档
    notes = TextField(null=True,verbose_name="备注")
    color = CharField(max_length=10,null=True,verbose_name="颜色")
    show_in_nav = BooleanField(null=True,default=0,verbose_name="菜单是否展示")
    default_label = BooleanField(null=True,default=0,verbose_name="是否是默认标签")

    class Meta:
        verbose_name = '标签状态表'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.name}"